TQ3ElementCopyAddMethod
You can define a method to copy the data of your custom element type when an element of that type is added element to a set.
typedef TQ3Status (*TQ3ElementCopyAddMethod) ( const void *fromAPIElement, void *toInternalElement);
fromAPIElement
- A pointer to the element data associated with an element having your custom element type.
toInternalElement
- On entry, a pointer to an uninitialized block of memory large enough to contain the element data associated with an element having your custom element type.
DESCRIPTION
YourTQ3ElementCopyAddMethod
function should copy the element data pointed to by thefromAPIElement
parameter into the location pointed to by thetoInternalElement
parameter. This method is called whenever theQ3Set_Add
orQ3AttributeSet_Add
function is used to add an element of your custom type to a set. ThefromAPIElement
parameter contains the same data pointer that was passed toQ3Set_Add
orQ3AttributeSet_Add
.RESULT CODES
YourTQ3ElementCopyAddMethod
function should returnkQ3Success
if it is successful andkQ3Failure
otherwise.